﻿@model IEnumerable<FCNS.ERP.Models.ErpUnit>

@{
    ViewBag.Title = ViewData["Flag"];
    Layout = "~/Views/Shared/_Layout.cshtml"; ;
}

<h2>@ViewBag.Title</h2>

<p> 
    @{ 
        var f = (int)ViewData["Flag"];
    }
    <a class="newObjA" href="/Basic/UnitNew?flag=@f">新增</a>
</p>
<table class="table">
    <thead>
        <tr> 
            <th>
                @Html.DisplayNameFor(model => model.Name)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>

        @foreach (var item in Model)
        {
            <tr> 
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.ActionLink("编辑", "UnitEdit", new { id = item.Id }) | 
                    <a href="UnitDelete/@item.Id" class="objDelete">删除</a>
                </td>
            </tr>
        }
    </tbody>

</table>
